package main

import (
	"fmt"
	"math"
)

type Areaer interface {
	area() float32
}

type Circl struct {
	radius float32
}
type Triangle struct {
	bottom_len float32
	height     float32
}

type Rectangle struct {
	length float32
	width  float32
}

func (a *Circl) area() float32 {
	return float32(math.Pi) * a.radius * a.radius
}

func (t *Triangle) area() float32 {
	return (*t).bottom_len * (*t).height / 2
}

func (r *Rectangle) area() float32 {
	return r.length * r.width

}

func main() {
	c := &Circl{1.2}
	t := &Triangle{bottom_len: 3.0, height: 2.0}
	r := &Rectangle{length: 3.3, width: 3.2}
	fmt.Println("圆：", c.area())
	fmt.Println("三角形：", t.area())
	fmt.Println("长方形：", r.area())
}
